using System;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace GriffinNav.Map
{
    public interface IMap
    {
        event GenericEventHandler MapViewUpdated;
        event MapErrorHandler OnMapError;

        MapInfo MapInfo
        {
            get;
        }

        Rectangle DisplayArea
        {
            get;
        }
        
        Rectangle BufferRectangle
        {
            get;
        }

        Rectangle ScreenRectangle
        {
            set;
        }

        Bitmap ScreenBuffer
        {
            get;
        }

        Graphics ScreenGraphics
        {
            get;
        }

        int PixelX
        {
            get;
        }

        int PixelY
        {
            get;
        }

        double Longitude
        {
            get;
        }

        double Latitude
        {
            get;
        }

        bool UpdatePending
        {
            get;
        }

        void Open(string filePath);
        void Open(string filePath, Size screenSize);
        void Close();

        void DrawScreen();
        void DrawScreen(Bitmap arrowImage, Rectangle arrowRectangle);

        bool PositionOutOfBounds(double longitude, double latitude);
        bool GoToPosition(double longitude, double latitude);
        bool GoToPosition(int pixelX, int pixelY);

        bool MoveUp();
        bool MoveUp(int pixels);
        bool MoveDown();
        bool MoveDown(int pixels);
        bool MoveLeft();
        bool MoveLeft(int pixels);
        bool MoveRight();
        bool MoveRight(int pixels);

        bool ZoomIn();
        bool ZoomOut();
    }
}
